[BUGFIX] Avoid unsafe array access to colPos#150
Open
smichaelsen wants to merge 1 commit intoIchHabRecht:mainfrom
Open
[BUGFIX] Avoid unsafe array access to colPos#150smichaelsen wants to merge 1 commit intoIchHabRecht:mainfrom
smichaelsen wants to merge 1 commit intoIchHabRecht:mainfrom
Conversation
When content elements are created as inline records (for example in news) they usually don't come with a colPos. This results in a fatal error with PHP 8.
Owner
|
Hi @smichaelsen, Please see my comment on #143. I still think it's wrong to fall back to colpos 0 as there might be some configuration which gets applied here. There needs to be a check for some whitelist items according to some value from the request and return early without any content_defender interaction. |
Author
|
You mean an early return in the content_defender hook class if some crucial fields are not provided? I can change my PR in that direction, if you want. |
3729d25 to
7a7455d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When content elements are created as inline records (for example in news) they usually don't come with a colPos. This results in a fatal error with PHP 8.